#ifndef FHE_GRAPHICS_GLWIDGET_H
#define FHE_GRAPHICS_GLWIDGET_H

#include <fhe/math/Color.h>
#include <QtOpenGL/QGLWidget>

namespace fhe
{
  using namespace core;
  namespace graphics
  {
    class GLWidget : public QGLWidget
    {
    public:
      typedef QGLWidget Super;
      
      class RenderTarget
      {
      public:
        virtual void render() = 0;
      };
      
      GLWidget( QWidget* parent, Color clearColor, RenderTarget* renderTarget );
      virtual ~GLWidget();
      
      void initializeGL();
      void resizeGL( int w, int h );
      void paintGL();
      
    private:
      Color clearColor_;
      RenderTarget* renderTarget_;
    };
  }
}

#endif
